package com.ds.infrastructure.hyperspace.console.model.response.stage;

import com.ds.infrastructure.hyperspace.console.entity.table.TbStage;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author: yaozhendong
 * @create: 2019-09-20 09:38
 **/
@Data
@NoArgsConstructor
public class GetStageVO {
    private Long id;

    private Long environmentId;

    private String stageName;

    private String description;

    private Date gmtModified;

    private Date gmtCreate;

    public static GetStageVO toVO(TbStage entity) {
        GetStageVO getStageVO = new GetStageVO();
        getStageVO.setId(entity.getId());
        getStageVO.setEnvironmentId(entity.getEnvironmentId());
        getStageVO.setStageName(entity.getStageName());
        getStageVO.setDescription(entity.getDescription());
        getStageVO.setGmtModified(entity.getGmtModified());
        getStageVO.setGmtCreate(entity.getGmtCreate());
        return getStageVO;
    }
}
